a = 30
b = 90
for x in range(0,a):
    y = a - x
    if 2 * x + 4 * y == b:
        print("鸡有"+str(x)+"只 , 兔有"+str(y)+"只")

